1. Field of Invention
This invention relates to a one or multiple axis joystick that uses incremental optical encoding and the principle of mechanical advantage to obtain a digital output of enhanced resolution that is a reliable measure of absolute shaft position and which can be read by a computer without interface circuitry.
2. Description of Prior Art
There is much prior art related to the use of joysticks as man-to-machine input devices. A variety of joysticks have been used to input commands to video game controllers or to control the motion of a cursor on a video screen. Examples include U.S. Pat. No. 4,488,017 (Lee) and U.S. Pat. No. 4,501,939 (Hyltin et al). Devices of this type employ electrical contacts or switches which are actuated by motion of the joystick shaft. Most of these joysticks are able to sense the motion of the shaft in one of four or eight different radial directions but do not sense how far the shaft has moved in the chosen direction. The output signal is digital in the sense that each contact or switch actuated by shaft motion is either open or closed. However, the digital resolution is exceedingly low (one binary bit of information for each of the eight detectable directions of shaft motion). Also, the electrical contacts in mechanically operated switches are subject to wear, corrosion, contamination, pitting, and contact bounce. Joysticks of this type lack the resolution and reliability needed for control of powered wheelchairs, fork lifts, machine tools, earth-moving machines, robotic devices, etc.
Efforts have been made to improve the resolution of digital joysticks that utilize mechanically actuated electrical contacts by increasing the number of contacts. One example is described in related U.S. Pat. Nos. 4,142,180; 4,148,014; 4,161,726; and 4,306,232 (Burson). Four-bit resolution along each of two orthogonal axes is obtained with eight sets of contacts. Other examples of multi-contact joysticks are described in U.S. Pat. No. 3,770,915 (Bennett et al) and U.S. Pat. No. 5,225,831 (Osborn). In each case of this type, the resolution achievable increases with the number of contacts employed but the joystick becomes mechanically complex if high resolution is needed. Note that the mechanical precision required doubles with each additional bit of resolution. Furthermore, the reliability of the joystick decreases and the cost increases as the number of contacts is raised to improve resolution.
Optoelectronic devices (typically pairs of light emitting diodes and phototransistors) have been used to improve the reliability of digital joysticks. U.S. Pat. No. 5,117,102 (Mitchell) describes such a joystick. It is intended as a direct replacement for the simpler joysticks employing mechanically actuated electrical contacts. As such, its resolution is limited to one binary bit in each of eight detectable directions. Another example of a digital joystick employing optical switches is disclosed in U.S. Pat. No. 4,856,785 (Lantz et al.). This device is intended as a direct replacement for the joysticks of the preceding paragraph that use multiple mechanically actuated electrical contacts for improved resolution. This patent describes a system employing six optical switches that provide slightly less than three bits of resolution along each of a pair of orthogonal axes. As with its mechanical counterparts, this approach can achieve higher resolution with more optical switches at the expense of rapidly escalating complexity and cost. Another disadvantage of this prior art device (Lantz et al.) is that it includes, along with some other prior art devices, an inherent source of non-linearity due to its conversion of shaft rotation to rectilinear motion of plates transporting the encoded medium. This problem will be discussed in detail later since the present invention removes it.
In an effort to achieve the very high resolution of joysticks employing resistive potentiometers while overcoming their well known reliability problems, non-contact analog joysticks have been developed. Some use inductive techniques while others exploit optoelectronic devices. U.S. Pat. No. 4,685,678 (Frederiksen) and U.S. Pat. No. 4,855,704 (Betz) disclose joysticks in which motion of the shaft alters the inductance of a coil which is part of an oscillator circuit. Then, a property of the oscillator (frequency, amplitude, or phase) is processed electronically to obtain an indication of shaft position. Variable transformer coupling between an excitation coil, moved by the joystick shaft, and fixed sensor coils is employed in U.S. Pat. No. 4,434,412 to obtain an analog signal indicative of shaft position. These approaches are more reliable than resistive potentiometers but are inherently non-linear (i.e., unlike resistive potentiometers which are normally fabricated to be very linear, the analog output signal from these inductive devices does not vary linearly with joystick shaft position). Electronic compensation of this inherent non-linearity is feasible but adds to cost and complexity. Furthermore, the analog signal must be processed through interface circuitry, typically including an analog-to-digital converter, before it can be used in a modern control system, almost all of which use digital microprocessors or microcomputers.
The analog joysticks employing optoelectronic devices suffer from the same drawbacks as the inductive devices just described. That is, the analog output signals tend to vary in a non-linear manner with changes of shaft position and the signal must be processed through interface circuitry before it can be utilized in a digital control system. Examples of this type of joystick are disclosed in U.S. Pat. No. 4,533,827 (Fincher); U.S. Pat. No. 4,607,159 (Goodson et al); U.S. Pat. No. 4,686,361 (Bard); and U.S. Pat. No. 4,731,530 (Mikan).
Historically, analog computers gave way to digital computers. Analog measuring instruments have been largely supplanted by digital instruments. Today, digital television is on the brink of replacing analog television. The reasons are numerous and some of them apply to joysticks. They include better immunity to noise, elimination of drift, improved repeatability of output readings (for a given joystick shaft position) from one reading to the next and one device to the next, greater accuracy, higher reliability, ease of transmission of the results, and lower cost. It seems probable that analog joysticks will go the way of analog computers and be displaced by digital devices like that of the present invention.
Many of the disadvantages of the preceding approaches to joystick implementation can be overcome by the use of digital optical encoding. Digital optical encoders are well developed, reliable, can be made very linear, and can interface directly with microprocessors or microcomputers without extra circuitry. There are two basic types of digital optical encoders, absolute and incremental. Both types can be very linear because the linearity is accurately built into the encoding disc or strip by photographic means. Absolute encoders use one track of an optically encoded disc or strip plus a light emitter-detector pair for each binary bit of resolution desired. Thus, the output of such an encoder is a binary word with all bits read in parallel to obtain an absolute indication of the position of the encoded disc or strip at that instant. Like the digital devices described earlier employing multiple switch contacts, the precision required on the optically encoded disc or strip doubles with each additional bit of resolution. Also, the demands placed upon the emitter-detector pairs escalate geometrically as the number of bits is increased. Hence, the complexity, size, and cost rise rapidly as the resolution increases and absolute encoders generally have not been exploited for joystick applications. Note, however, that the device described earlier as disclosed in U.S. Pat. No. 4,856,785 (Lantz et al.) can be viewed as a joystick employing absolute optical encoding but with relatively low resolution. Absolute digital optical encoders are used extensively in those precision control applications where the need for accurate absolute position sensing outweighs the related cost.
A lower cost alternative to the digital absolute encoder is the digital incremental encoder. This technique employs two tracks of an optically encoded disc or strip plus two light emitter-detector pairs. The two tracks are offset in phase by 90 degrees and well known techniques are used to derive a direction-of-motion signal from the relative phase relationship of the two optically derived signals. The signal from either track is a train of pulses that is counted electronically and the direction-of-motion signal tells the counter whether to count up or down. Changes in the count provide a measure of changes in position of the encoded disc or strip (and, hence, of the joystick shaft) but the count at any instant does not provide an absolute indication of the position of the encoded disc or strip at that instant (hence the name, incremental encoding). This difficulty is overcome partially by addition of a third track encoded at any desired position with a single pulse that clears or presets the counter at that position. A limitation of this third track approach is that there is no absolute position information available until the counter has received the clear or preset pulse the first time. Thus, when power first comes on, the counter might be reading anything and the joystick shaft might be anywhere and, therefore, no position information is available. This is unacceptable in many joystick applications; a powered wheelchair, for example, because the chair could "take off" with arbitrary direction and speed when first powered up. It would be simple enough to clear the counter automatically upon powering up. This would solve the problem provided that the joystick shaft was always in the neutral position at that time. But, in many cases (the power chair case, for example), there can be no such guarantee. Therefore, the application of incremental optical encoding to a joystick requires a fail-safe means of converting the incrementally encoded signals into absolute position information. The present invention provides a means for doing this.
The resolution attainable with an incremental encoder matches that from an absolute encoder if the density and precision of both of the phase related tracks of the incremental encoder match that of the absolute encoder's most dense track (the track of its highest order bit). Clearly, the cost advantage of the incremental encoder over the absolute encoder increases as the number of bits of resolution increases.
U.S. Pat. No. 4,958,071 (Scott-Jackson et al) discloses a mechanically complex two-axis joystick that uses photographic film as the encoded medium for implementing incremental optical encoding. This patent does not disclose any method for converting the incrementally encoded signals into absolute position information, a requirement in most practical applications of a joystick. Note also that the resolution provided by the method disclosed, while potentially very high, is limited by the density of the pattern encoded on the film and the ability of the optical components to read that pattern correctly. This is important because the present invention overcomes this significant limitation inherent in the prior art, as will be shown.
Digital incremental optical encoding is widely used in devices designed to control the position of a cursor on a video screen. A cursor control device is commonly called a mouse or trackball. Examples are described in U.S. Pat. Nos. 4,464,652 and 5,168,268 (Levy). The mouse or track ball is a fundamentally different device from the type of joystick that outputs an absolute indication of shaft position, even though incremental optical encoding can be applied to either. In the case of a mouse, it is not necessary to obtain absolute position information from the incrementally encoded signals. The user derives this information by noting the position of the cursor on the screen. Then, the mouse is moved manually until the cursor is in the desired position. It is not necessary for the electronics to count the pulses from the mouse, although some electronic schemes used with a mouse do count pulses, because the user just continues to move the mouse and generate more pulses until the cursor is in the desired location. The initial location of the cursor upon power-up is not very important so long as it is somewhere in the field of view.
The signals from an incremental optical encoder can be processed by a microprocessor or microcomputer as in U.S. Pat. No. 4,493,992 (Geller). This patent discloses a mode of operation in which a microcomputer determines the direction of motion from the signals of the two phase-related tracks and then advances a software counter in the proper direction by one count for each pulse received from one of the tracks. A continuous software loop performs these operations sequentially for the two axes of the mouse (trackball) described. This is a simple scheme that works well provided the input pulses don't occur too rapidly. A count can be missed if a pulse from one axis appears and disappears while the sequentially operating software is processing a pulse from the other axis. The most stressful condition occurs when both axes are feeding rapid pulses to the microcomputer simultaneously. The parallel port of the microcomputer, which receives all of the input signals from the encoders in Geller's disclosure, is level sensitive rather than edge sensitive and can not retain the fact that a pulse occurred on one or more of its bit lines. The software must be reading these input bit lines while the pulse is present or the pulse is lost. The speed of the microcomputer is such that this is not a serious problem in normal operation of a mouse. However, a joystick employing incremental optical encoding that is slammed rapidly from neutral to full scale along both axes at once can lose a number of counts if the method of the referenced patent is used. The present invention discloses a method that largely overcomes this limitation of the prior art.
Another approach to processing the signals from a mouse that uses incremental optical encoding is disclosed in U.S. Pat. No. 5,252,968 (Donovan). Here an application specific integrated circuit (ASIC), sometimes called a custom IC, is used to receive the signals from the optoelectronics of the encoders and convert these into cursor control outputs. This is fundamentally different from Geller's approach in that the ASIC is not a general purpose device operating under control of a stored application program. The ASIC approach, while powerful and potentially very fast, has a very high development cost that can be justified only in a very high volume application. Instead, the present invention discloses means for accomplishing all of the electronic signal processing desired with a single, low cost microcomputer available on the market as a standard product.